import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '../pages/Login'
import Home from '../pages/Home'
import Group from '../pages/Group'
import Media from '../pages/Media'
import Mine from '../pages/Mine'
import Broadcast from '../pages/Broadcast'
Vue.use(Router)

export default new Router({
  // 去掉#
  // 格式化,路由模式;路径和组件组成路由;
  mode: 'history',
  routes: [
    {
      path: '/hello',
      name: 'Hello',
      component: HelloWorld
    },
    {
      path: '/',
      name: '首页',
      component: Home
    },
    {
      path: '/login',
      name: '登录',
      component: Login
    },
    {
      path: '/group',
      name: '小组',
      component: Group
    },
    {
      path: '/mine',
      name: '我的',
      component: Mine
    },
    {
      path: '/media',
      name: '书影音',
      component: Media
    },
    {
      path: '/broad',
      name: '广播',
      component: Broadcast
    }
  ]
})
